package cn.getech.data.development.service;

import cn.getech.data.development.dto.IdAndNameDto;
import cn.getech.data.development.entity.BdpRealTaskAlarm;
import cn.getech.data.development.model.dto.RealTaskAlarmInfoDto;
import cn.getech.data.development.model.dto.RealTaskAlarmSaveDto;
import cn.getech.data.development.model.vo.RealTaskAlarmSearchVO;
import cn.getech.data.development.model.vo.RealTaskAlarmVO;
import cn.getech.data.intelligence.common.utils.PageUtils;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

/**
 * <p>
 * 实时任务告警表 服务类
 * </p>
 *
 * @author hujz
 * @since 2021-04-08
 */
public interface IBdpRealTaskAlarmService extends IService<BdpRealTaskAlarm> {

    PageUtils alarmPage(RealTaskAlarmSearchVO realTaskAlarmSearchVO);

    void delete(Integer id);

    void updateStatusById(Integer id, Integer state);

    void save(RealTaskAlarmSaveDto realTaskAlarmSaveDto);

    void update(RealTaskAlarmSaveDto realTaskAlarmSaveDto);

    RealTaskAlarmVO getInfoById(Integer id);

    RealTaskAlarmVO needInfo();

    /***
     * 判断是否报警，并且推送报警消息
     * @param taskMenuId 任务的id
     * @param runStatus 任务的运行状态
     */
    void cheackIsAlarmAndPushMsg(Integer taskMenuId,Integer runStatus);

    List<RealTaskAlarmInfoDto> cheackAndPush(List<RealTaskAlarmInfoDto> needPushs, LocalTime now);

    List<IdAndNameDto> getRecriverList();

    List<IdAndNameDto> getCreaterList();
}
